package redBlackTree.smartInfo;

import java.util.HashSet;
import java.util.Set;

import smarties.SmartNode;

/**
 * Classe permettant de faire l'interface entre les noeuds du graphe et les
 * noeuds de la structure interne d'arbre rouge et noir.
 * 
 * @author buthane
 */
public class SmartInfoRBTNode implements Comparable<SmartInfoRBTNode>
{
	private final Set<SmartNode>	nodeList	= new HashSet<SmartNode>();
	private final Double			value;

	public Set<SmartNode> getSmartNodeSet()
	{
		return this.nodeList;
	}

	public void addSmartNode(SmartNode node)
	{
		this.nodeList.add(node);
	}

	public Double getValue()
	{
		return this.value;
	}

	public int compareTo(SmartInfoRBTNode o)
	{
		return this.getValue().compareTo(o.getValue());
	}

	public SmartInfoRBTNode(Double value)
	{
		this.value = value;
	}

	@Override
	public String toString()
	{
		return this.value.toString();
	}
}
